Facial Recognition
POSThttps://api.apptenticate.com/api/v3/biometrics/recognizer/face/
Authentication
Use your JWT obtained from the authentication process to make requests to this endpoint.
The response will be 401 unauthorized if the JWT is expired. In this case you will have to obtain a new JWT.
This operation allows you to recognize a Person according to the image and the citizen_id of the request.
** NOTE **
• The response may be 401 unauthorized if the JWT token must be refreshed.
• The image sent in jpg or png format must not exceed 2MB.
Request structure - method: POST
Ruta: api/v3/biometrics/recognizer/face/
• Payload para request base:
Payload: {
'citizen_id': Citizen ID,
'image': Selfie image
} // (Where images are .jpg or .png files)
Examples of requests
Python
#JWTToken
header = { 'Authorization': 'Bearer {}'.format(token) }
# Payload for base request
data = {'citizen_id': '1234'}
files=[
('image',(unknow.jpeg',open('/D:/unknow.jpeg','rb'),'image/jpeg'))
]
# Where images are .jpg or .png files
# Send request
response = requests.post(
apptenticate_url,
data=data,
files=files,
headers=header
)
response = json.loads(response.content)
Response structure
Response format: JSON
• Base response (True):
Answer: {
"id": "e80d4738-adc3-833f715d655c",
"created_at": "2022-09-30T13:22:43.086385Z",
"result": true,
"result_text": "Recognised face",
"name": "Will Smith",
"citizen_id": "1234"
}
• Base response (False):
Answer: {
"id": "f78d463u-9876-3356-223a-84s4f7as5d655c",
"created_at": "2022-09-30T13:23:40.922403Z",
"result": false,
"result_text": "Face does not match ID"
}
Response Codes
| Codigo | Mensaje |
|---|---|
200 | Query completed correctly. |
500 | An error occurred obtaining catalog. |
400 | The request is poorly formulated. |
404 | Person not found. |